package com.globallogic.javatrainings.sergiiivanov.view;

import com.globallogic.javatrainings.sergiiivanov.resources.Formating;
import com.globallogic.javatrainings.sergiiivanov.resources.Messages;

public class PersonnelDetailsPage extends GUI {

    public void pageAddPerson() {
        newPage();
        show("Adding new personnel");
    }

    public void pageAddResumeEntry() {
        show("To add new entry to the resume");
        show("please, provide the information below");
    }

    public void pageAssignRoomStep1Building(String[] buildingList) {
        show("Select building with room you want to assign");
        showArrayAsList(buildingList);
    }

    public void pageAssignRoomStep2Room(String[] roomsList) {
        show("Select room you want to assign");
        showArrayAsList(roomsList);
    }

    public void pageChaneEmailForm() {
        show("Enter new email");
    }

    public void pageChangeNameForm() {
        show("Enter new name (or single space for no changes)");
    }

    public void pageConfirmPersonDeletion() {
        show("You are about to delete this personnel");
        show("Are you sure? (Y/N)");
    }

    public void pageResume(String[][] resume) {
        show("Resume:");
        showLineOfList(Messages.MENU_BACK, 0);
        showTableOrdered(resume, 1);
        show("Select entry to remove or...");
        showLineOfList("Add new entry", resume.length + 1);
    }

    public void pageShowAssignedRooms(String person,
            String[] assignedRooms) {
        newPage();
        show("Rooms assigned to " + person);
        showLineOfList(Messages.MENU_BACK, 0);
        showArrayAsList(assignedRooms, 1);
        show("Select room to unassign or...");
        showLineOfList("Assing another room", assignedRooms.length + 1);
    }

    public void pageShowPersonDetailsHeader(String title) {
        newPage();
        show(title + Formating.LIST_LINE_TAB + " > Personnel details");
    }

    public void pageShowPersonDetailsMenu(String[] menu) {
        show("Actions:");
        showArrayAsList(menu);
    }

    public void pageShowPersonnelList(String title, String[] personnel) {
        newPage();
        show(title + " > Personnel");
        showLineOfList(Messages.MENU_BACK, 0);
        show("Select personnel for more details");
        showArrayAsList(personnel, 1);
        showLineOfList("Add new personnel...", 1 + personnel.length);
    }

    public void pageUpdatePhoneForm() {
        show("Enter new phone");

    }

    public void pageUpdateResponcibilities() {
        show("Enter new responcibilities for the personnel");
    }

    public void pageResponcililities(String responcibilities) {
        show("Responcibilities " + responcibilities);

    }

}
